using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;

namespace Beaker.OpenCube.Resources
{
	[DataContract]
	[KnownType( typeof( int ) )]
	[KnownType( typeof( TextureFrameMetadata ) )]
	public class TextureAnimationMetadata
	{
		[DataMember( Name = "frametime", IsRequired = false )]
		public int? FrameTime { get; set; }

		[DataMember( Name = "frames", IsRequired = false )]
		[JsonConverter( typeof( TextureFrameMetadataConverter ) )]
		public List<TextureFrameMetadata> Frames { get; set; }
	}
}